package com.topvision.service.impl.zwan;

import com.topvision.annotation.DataSource;
import com.topvision.db.DataSourceConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.topvision.mapper.zwan.CompanytrunkinfoMapper;
import com.topvision.model.zwan.Companytrunkinfo;
import com.topvision.service.zwan.CompanytrunkinfoService;

@Service("companytrunkinfoService")
public class CompanytrunkinfoServiceImpl implements CompanytrunkinfoService {
	@Autowired
	private CompanytrunkinfoMapper companytrunkinfoMapper;
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public Companytrunkinfo queryObject(String portnumber){
		return companytrunkinfoMapper.queryObject(portnumber);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public List<Companytrunkinfo> queryList(Map<String, Object> map){
		return companytrunkinfoMapper.queryList(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public int queryTotal(Map<String, Object> map){
		return companytrunkinfoMapper.queryTotal(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void save(Companytrunkinfo companytrunkinfo){
		companytrunkinfoMapper.save(companytrunkinfo);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void update(Companytrunkinfo companytrunkinfo){
		companytrunkinfoMapper.update(companytrunkinfo);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void delete(String portnumber){
		companytrunkinfoMapper.delete(portnumber);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void deleteBatch(String[] portnumbers){
		companytrunkinfoMapper.deleteBatch(portnumbers);
	}

	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public int activeDevice(Map<String, Object> params) {
		return companytrunkinfoMapper.activeDevice(params);
	}

}
